package com.lagou.feign;

import com.lagou.pojo.Products;
import com.lagou.pojo.ProductsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @Author : liuchangling
 * @Descrition :
 * @Date： Created in 6:07 下午 2021/9/17
 */
@FeignClient(name = "lagou-service-goods",fallback = GoodsFeignFallBack.class)
public interface GoodsFeign {
    @GetMapping("/product/query/{id}")
    Products query(@PathVariable Integer id);

    @DeleteMapping("/product/delete/{id}")
    int delete(@PathVariable Integer id);


    @PostMapping("/product/saveOrUpdate")
    int saveOrUpdate(@RequestBody Products products);

    @PostMapping("/product/queryByPage")
    Map<String,Object> queryByPage(@RequestBody ProductsVo productsVo);

    @GetMapping("/product/queryGoodsList/{id}")
    List<Products> queryGoodsById(@PathVariable Integer id);
}
